<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- <script>
      var xhr = new XMLHttpRequest();
      xhr.onreadystatechange = function () {
        if (xhr.readyState === 4 && xhr.status === 200) {
          console.log(xhr);
        }
      };
      xhr.open("GET", "https://suggest.taobao.com/sug?code=utf-8&q=%E5%A5%B3");
      xhr.send();
    </script> -->

    <!-- <script>
        function xx(obj) {
            console.log(obj);
        }
    </script>
    <script src="https://suggest.taobao.com/sug?code=utf-8&q=%E5%A5%B3&callback=xx"></script> -->

    <script>
      var xhr = new XMLHttpRequest();
      xhr.onreadystatechange = function () {
        if (xhr.readyState === 4 && xhr.status === 200) {
          console.log(JSON.parse(xhr.response));
        }
      };
      xhr.open(
        "GET",
        "https://api.kele8.cn/agent/https://suggest.taobao.com/sug?code=utf-8&q=%E5%A5%B3"
      );
      xhr.send();
    </script>

    <!-- 响应头添加 access-control-allow-origin: * -->

    <!-- https://api.kele8.cn/agent/  node代理中转 解决跨域 -->
  </body>
</html>
